#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <unordered_map>

using namespace std;


vector<vector<int>> subsets(vector<int>& nums) {
	vector<vector<int>> ans;
	vector<int> path;
	Recursion(nums, 0, ans, path);
	return ans;
}


void Recursion(vector<int>& nums,int beg, vector<vector<int>>& ans, vector<int>& path) {
	ans.push_back(path);
	
	if (beg >= nums.size())return;

	for (size_t i = beg; i < nums.size(); i++)
	{
		path.push_back(nums[i]);
		Recursion(nums, i + 1, ans, path);
		path.pop_back();
	}

}